{include 'admin/layout/header_list'}
<link rel="stylesheet" href="__ADMIN_STATIC__/css/plugin.css?random={extendSetting('random')}">
<div class="ltcms_container">
    <div class="container_title">
        <form action="{LTCMS_ROUTE_PREFIX}/article/indexRecycle?moduleId={$request['moduleId']}" method="get" class="ltcms_search">
            <input type="hidden" name="moduleId" value="{if isset($request['moduleId'])}{$request['moduleId']}{/if}" >
            <select name="status" style="width:150px;margin-left:5px;margin-right:10px;">
                <option value="">请选择状态</option>
                <option value="1">草稿</option>
                <option value="2">待审核</option>
                <option value="3">已发布</option>
            </select>
            <select name="categoryId" style="width:150px;margin-left:5px;margin-right:10px;">
                <option value="">请选择分类</option>
                {LTcms:categoryHtml dataType="module" dataId="<request.moduleId>" selectId="<request.categoryId>" /}
            </select>
            <input name="author" type="text" placeholder="请输入文章作者" {if isset($request['author'])} value="{$request['author']}" {/if}  >
            <input name="title" type="text" placeholder="请输入文章标题" {if isset($request['title'])} value="{$request['title']}" {/if}>
            <button type="submit" class="btn3">搜索</button>
        </form>
    </div>
    <section class="ltcms_content">
        <div class="ltcms_list">
            <table class="list_table">
                <colgroup>
                    <col width="40px" >
                    <col width="60px" >
                    <col width="300px" >
                    <col width="80px" >
                    <col width="80px" >
                    <col width="140px" >
                    <col width="80px" >
                    <col width="150px" >
                    <col >
                </colgroup>
                <tr>
                    <td class="th"><input id="selectAll" type="checkbox"></td>
                    <td class="th">序号</td>
                    <td class="th">文章标题</td>
                    <td class="th">缩略图</td>
                    <td class="th">状态</td>
                    <td class="th">发布时间</td>
                    <td class="th">点击量</td>
                    <td class="th">作者</td>
                    <td class="th">操作</td>
                </tr>
                {if $articleListData}
                {foreach  $articleListData["data"] $key $val}
                    <tr class="tr">
                        <td><input class="checkbox" name="check_id" type="checkbox" value="{$val['id']}"></td>
                        <td>{$val['id']}</td>
                        <td>{$val['title']}</td>
                        <td>{if $val['thumb'] } <div class="img"><img onclick="scale_img(this)" src="{$val['thumb']}" style="max-height:50px;" alt="" onerror="javascript:this.src='__ADMIN_STATIC__/img/noImg.jpg';" ></div> {else} --- {/if}</td>
                        <td>{$val['statusFormat']}</td>
                        <td>{$val['addTimeFormat']}</td>
                        <td>{$val['hits']}</td>
                        <td>{$val['author']}</td>
                        <td>
                            <div class="btn4">
                                <a href="{LTCMS_ROUTE_PREFIX}/article/edit?moduleId={$request['moduleId']}&id={$val['id']}">
                                    <i title="编辑" class="btn4-img iconfont icon-bianji"></i>
                                </a>
                                <a href="{$val['useLinkUrl']}" target="_blank" title="预览">
                                    <i class="btn4-img iconfont icon-yulan"></i>
                                </a>
                                <i onClick="runApi(this)" title="删除" data-close="4" data-submit-url="{LTCMS_ROUTE_PREFIX}/article?moduleId={$request['moduleId']}&id={$val['id']}" data-method="delete" alt="" class="btn4-img del iconfont icon-delete"></i>
                            </div>
                        </td>
                    </tr>
                {/foreach}
                {/if}
            </table>
        </div>
    </section>
    <div class="list-bottom">
        <div class="bottom-left">
            <button class="btn2 trash" onclick="dataMoreDel(this)" data-alert="确认还原吗？" data-close="3" data-submit-url="{LTCMS_ROUTE_PREFIX}/article/setRecycle?moduleId={$request['moduleId']}&recycle=1" data-method="put"  >还原</button>
            <button class="btn2 del1" onclick="dataMoreDel(this)" data-close="3" data-submit-url="{LTCMS_ROUTE_PREFIX}/article/?moduleId={$request['moduleId']}&id=" data-method="delete"  >彻底删除</button>
        </div>
        <div class="pages">
            {if $articleListData}
            {php  echo app("P_page")->getPageBarV2($articleListData);}
            {/if}
        </div>
    </div>
</div>
<script src="__ADMIN_STATIC__/js/list.js?random={extendSetting('random')}"></script>
{include 'admin/layout/footer'}